The invention relates to an electronic control device for controlling a fuel injection starting time and a fuel injection duration in an internal combustion engine. Such electronic control devices can be used to perform a variety of functions. One activity, in particular a control function, is carried out according to the counter state of a counter. This activity can take place for example when the counter is counting or when it has reached a specific counter state. The counter is connected to a clock source which controls the counting in the counter. The range of application of known electronic control devices is limited by the relatively rigidly prescribed possibilities.